# -*- coding: utf-8 -*-

import logging

from datetime import timedelta

# pip install timeloop
from timeloop import Timeloop

tl = Timeloop()


@tl.job(interval=timedelta(seconds=2))
def job_every():
    logging.debug("execute")
    pass


if __name__ == '__main__':
    # 设置日志格式
    logging.basicConfig(level=logging.DEBUG,
                        format='%(asctime)s - [%(levelname)s] - {%(pathname)s:%(lineno)d} (%(funcName)s) - %(message)s')
    # 以阻塞模式启动时间循环
    tl.start(block=True)

    pass
